Library object
This method will load a DLL library.
bool load(string library_filename)
Parameters:
library_filename
The filename of the DLL to open, with or without extension.
Return value:
true on success, false on failure.
Remarks:
When specifying the filename, either an absolute or relative path can be used. If no absolute path is specified, the DLL will be searched for in the script directory, followed by the system directory, followed by the Windows directory. If the DLL cannot be found in any of these locations, the method will return false.
Example:
// Show a message box using the conventional Windows MessageBox function.
const int win32_mb_icon_information=0x00000040; // The value as written in the MSDN.
void main()
{
library dll;
dll.load("user32.dll");
// The MessageBox parameter takes a window handle, the text, the title, and the flags.
dll.call("int MessageBoxA(int, char*, char*, int);", 0, "I am a message box using user32.dll.", "Hey there", win32_mb_icon_information);
}